package com.p595263720.o_amap.location.model;

import com.amap.api.location.AMapLocation;

public class UnifiedAMapLocation {
    private int gpsAccuracyStatus;
    private int locationType;
    private String locationDetail;
    private int errorCode;
    private String errorInfo;
    private String country;
    private String address;
    private String province;
    private String city;
    private String district;
    private String cityCode;
    private String adCode;
    private String poiName;
    private double latitude;
    private double longitude;
    private int satellites;
    private String street;
    private String streetNum;
    private boolean isOffset;
    private String aoiName;
    private String buildingId;
    private int floor;
    private boolean isFixLastLocation;
    private boolean isMock;
    private double accuracy;
    private double bearing;
    private double altitude;
    private double speed;
    private String provider;
    private UnifiedAMapLocationQualityReport locationQualityReport;
    private String coordType;
    private int trustedLevel;

    public UnifiedAMapLocation(AMapLocation aMapLocation) {
        this.gpsAccuracyStatus = aMapLocation.getGpsAccuracyStatus();
        this.locationType = aMapLocation.getLocationType();
        this.locationDetail = aMapLocation.getLocationDetail();
        this.errorCode = aMapLocation.getErrorCode();
        this.errorInfo = aMapLocation.getErrorInfo();
        this.country = aMapLocation.getCountry();
        this.address = aMapLocation.getAddress();
        this.province = aMapLocation.getProvince();
        this.city = aMapLocation.getCity();
        this.district = aMapLocation.getDistrict();
        this.cityCode = aMapLocation.getCityCode();
        this.adCode = aMapLocation.getAdCode();
        this.poiName = aMapLocation.getPoiName();
        this.latitude = aMapLocation.getLatitude();
        this.longitude = aMapLocation.getLongitude();
        this.satellites = aMapLocation.getSatellites();
        this.street = aMapLocation.getStreet();
        this.streetNum = aMapLocation.getStreetNum();
        this.isOffset = aMapLocation.isOffset();
        this.aoiName = aMapLocation.getAoiName();
        this.buildingId = aMapLocation.getBuildingId();
        this.floor =aMapLocation.getFloor().length()>0?Integer.getInteger(aMapLocation.getFloor()):0;
        this.isFixLastLocation = aMapLocation.isFixLastLocation();
        this.isMock = aMapLocation.isMock();
        this.accuracy = aMapLocation.getAccuracy();
        this.bearing = aMapLocation.getBearing();
        this.altitude = aMapLocation.getAltitude();
        this.speed = aMapLocation.getSpeed();
        this.provider = aMapLocation.getProvider();
        this.locationQualityReport = new UnifiedAMapLocationQualityReport(aMapLocation.getLocationQualityReport());
        this.coordType = aMapLocation.getCoordType();
        this.trustedLevel = aMapLocation.getTrustedLevel();
    }
}
